package com.linewow.xhyy.nihaonew.other.decoration;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * Created by LXR on 2016/10/24.
 */
public class TopicDetailDecoration extends RecyclerView.ItemDecoration {
    private int space;

    public TopicDetailDecoration(int space) {
        this.space = space;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        if(parent.getChildPosition(view)!=0){
            outRect.top=space;
        }
    }
}
